package de.tudarmstadt.ukp.wikisniffer.userstudy.datastore;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class PropertyLoader {
	
	private Properties properties;
	
	public PropertyLoader(String path) throws IOException{
		
		
		properties = new Properties();
		
		FileInputStream stream = new FileInputStream(path);
		properties.loadFromXML(stream);
		stream.close();
	}
	
	public String getProperty(String key){
		return properties.getProperty(key);
	}
	
	public Long getPropertyAsLong(String key){
		return Long.parseLong(properties.getProperty(key));
	}

}
